package com.zhongkai.controller;

import com.zhongkai.app.service.RoleControlService;
import com.zhongkai.model.utils.ZhongkaiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class RoleControlController {

    @Autowired
    private RoleControlService roleControlService;


    /**
     * 添加角色
     */
    @RequestMapping(value = "/role/add", produces = "application/json;charset=utf-8")
    @ResponseBody
    public ZhongkaiResult device_switch(String name) {

        ZhongkaiResult result = roleControlService.role_add(name);

        return result;
    }
}
